/*交流讨论社区模块接口*/
import request from "@/utils/request";

//获取最新五个帖子(交流讨论社区)
export function getNewPostInfo(data){
    return request({
        url:'/post/getNewPostInfo',
        method:'post',
        data
    })
}

//获取所有通过审核的帖子信息（用户端）分类别
export function getAllPostInfo(data){
    return request({
        url:'/post/getAllPostInfo',
        method:'post',
        data
    })
}

//根据帖子id获取该帖子具体信息
export function getPostInfoByPostID(data){
    return request({
        url:'/post/getPostInfoByPostID',
        method:'post',
        data
    })
}

//根据帖子id获取该帖子所有评论信息
export function getCommentInfoByPostID(data){
    return request({
        url:'/post/getCommentInfoByPostID',
        method:'post',
        data
    })
}

//发表帖子信息评论
export function addPostComment(data){
    return request({
        url:'/post/addPostComment',
        method:'post',
        data
    })
}

//获取当前登录用户的帖子
export function getMyPostInfo(data){
    return request({
        url:'/post/getMyPostInfo',
        method:'post',
        data
    })
}

//根据帖子id删除帖子
export function deletePost(data){
    return request({
        url:'/post/deletePost',
        method:'post',
        data
    })
}

//获取当前登录用户发布的全部帖子评论信息
export function getMyPostComment(data){
    return request({
        url:'/post/getMyPostComment',
        method:'post',
        data
    })
}

//根据帖子评论id删除该评论
export function deletePostComment(data){
    return request({
        url:'/post/deletePostComment',
        method:'post',
        data
    })
}

//修改帖子评论
export function updatePostComment(data){
    return request({
        url:'/post/updatePostComment',
        method:'post',
        data
    })
}

//根据用户id获取用户发布的帖子
export function getUserPostInfo(data){
    return request({
        url:'/post/getUserPostInfo',
        method:'post',
        data
    })
}

//修改帖子信息
export function updatePost(data){
    return request({
        url:'/post/updatePost',
        method:'post',
        data
    })
}

//增加阅读量
export function addPostCtrByID(data){
    return request({
        url:'/post/addPostCtrByID',
        method:'post',
        data
    })
}
